package com.label.Model.Do;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.Data;

import java.util.Date;

@TableName("task_detail")
@Data
public class TaskDetail {

    @TableId(value = "detail_id",type = IdType.ASSIGN_UUID)
    private String detailId;

    @TableField("task_id")
    private String taskId;

    @TableField("receiver_id")
    private String receiverId;

    @TableField("receiver_name")
    private String receiverName;

    @TableField("detail_states")
    private Integer detailState;

    @TableField("charger")
    private String charger;

    @TableField("leader_flag")
    private String leader;

    @TableField("detail_class")
    private String detailClass;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date updateTime;


    public TaskDetail(){}

    public TaskDetail(String taskId,String receiverId,String receiverName,String charger,String leader,String detailClass){
        this.taskId=taskId;
        this.receiverId=receiverId;
        this.receiverName=receiverName;
        this.detailState=0;//0是未查看，1是完成，2是存在问题。
        this.charger=charger;
        this.leader=leader;
        this.detailClass=detailClass;
    }

    public TaskDetail(String detailId,Integer state){
        this.detailId=detailId;
        this.detailState=state;
    }
}
